"use strict";

angular.module('app.project', [ 'ui.router']);


angular.module('app.project').config(function ($stateProvider) {

    $stateProvider
        .state('app.project', {
            abstract: true,
            data: {
                title: '项目管理'
            }
        })
        .state('app.project.mytask', {
            url: '/mytask/:taskid/:projectid',
            data: {
                title: '我的任务',
                level: 'level_4'
            },
            views: {
                "content@app": {
                    controller: 'MyTaskCtrl',
                    templateUrl: "project/views/mytask.html"
                }
            }
        })
         .state('app.project.add_newProject', {
             url: '/add_newProject',
            //  abstract: true,
             views: {
                 "content@app": {
                     controller: 'Add_newProjectCtrl',
                     templateUrl: 'project/views/add_newProject.html'
                 }

             },
             data: {
                 title: '添加新项目',
                 level: 'level_8'

             }
        })
        .state('app.project.add_newProject.projectTemplate', {
            url: '/projecttemplate',
            //abstract: true,
            data: {
                title: '设备信息',
                level: 'level_8'
            },
            views: {
                'project_a@app.project_a': {
                    controller:'ProjectModelCtrl',
                    templateUrl: 'project/views/project_m.html'
                }
            }

        })
       .state('app.project.myallprojects', {
           url: '/myallprojects/:project_id',
           views: {
               "content@app": {
                   controller: 'MyAllProjectCtrl',
                   templateUrl: 'project/views/myallproject.html'
               }

           },
           data: {
               title: '我的项目',
               level: 'level_8'

           }
       })
        .state('app.project.budget', {
            url: '/budget/:project_id',
            views: {
                "content@app": {
                    controller: 'BudgetCtrl',
                    templateUrl: 'project/views/budget.html'
                }

            },
            data: {
                title: '预算和成本',
                level: 'level_8'

            }
        })
       .state('app.project.devicebinding', {
        url: '/devicebinding',
        views: {
            "content@app": {
                controller: 'DeviceBindCtrl',
                templateUrl: 'project/views/device_bind.html'
            }

        },
        data: {
            title: '设备绑定',
            level: 'level_8'

        }
    })
       
    
});